<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script src="lib/clone.js"></script>
        <script>
            let a = { c: 1 };
            let b = clone(a); // 深拷贝

            a.c = 2; // 对a的修改，不会影响到b

            console.log(a.c); // 输出 2
            console.log(b.c); // 输出 1
        </script>
    </body>
</html>
